View Javadoc
1 //============================================================================== 2 // file : NewsBeanBase.java 3 // project: East Networks News System 4 // 5 // last change: date: $Date: 2003/09/10 09:28:36 $ 6 // by: $Author: bitiboy $ 7 // revision: $Revision: 1.1 $ 8 //------------------------------------------------------------------------------ 9 // copyright: GNU GPL Software License (see class documentation) 10 //============================================================================== 11 package net.eastol.news.jdo.bean; 12 13 import com.justhis.util.Base64Utils; 14 import com.justhis.util.exception.UtilException; 15 16 /* 17 * $Id: NewsBeanBase.java,v 1.1 2003/09/10 09:28:36 bitiboy Exp $ 18 * 19 * Copyright 2003 Acai Software All Rights Reserved. 20 * 21 * This file NewsBeanBase.java is part of the East Networks News System. 22 23 * The East Networks News System is free software; you can redistribute it and/or modify 24 * it under the terms of the GNU General Public License as published by 25 * the Free Software Foundation; either version 2 of the License, or 26 * (at your option) any later version. 27 28 * East Networks News System is distributed in the hope that it will be useful, 29 * but WITHOUT ANY WARRANTY; without even the implied warranty of 30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 31 * GNU General Public License for more details. 32 33 * You should have received a copy of the GNU General Public License 34 * along with the East Networks News System; if not, write to the Free Software 35 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 36 37 * http://www.justhis.com http://ejb.cn 38 * CONTACT: email = webmaster@justhis.com superaxis@sohu.com 39 */ 40 import java.util.Date; 41 42 import javax.jdo.JDOHelper; 43 44 45 /*** 46 * TODO DOCUMENT ME! 47 * 48 * @author <a href="http://blog.ejb.cn">acai</a> 49 * @version $Revision $ 50 */ 51 public class NewsBeanBase implements JDOConst, News { 52 //~ Instance fields -------------------------------------------------------- 53 54 /*** TODO */ 55 public Date date; 56 57 /*** TODO */ 58 public String author; 59 60 /*** TODO */ 61 public String newsClassId; 62 63 /*** TODO */ 64 public String objectId; 65 66 /*** TODO */ 67 public String summary; 68 69 /*** TODO */ 70 public String title; 71 72 /*** TODO */ 73 public String titleImg; 74 75 /*** TODO */ 76 public int hits = 0; 77 78 //~ Constructors ----------------------------------------------------------- 79 80 /*** 81 * Creates a new NewsBeanBase object. 82 */ 83 public NewsBeanBase() { 84 super(); 85 86 87 } 88 89 //~ Methods ---------------------------------------------------------------- 90 91 /*** 92 * @see net.eastol.news.jdo.bean.News#setAuthor(java.lang.String) 93 */ 94 public void setAuthor(String string) { 95 this.author = string; 96 } 97 98 /*** 99 * @return TODO 100 */ 101 public String getAuthor() { 102 return author; 103 } 104 105 /*** 106 * @see net.eastol.news.jdo.bean.News#setClassId(java.lang.String) 107 */ 108 public void setClassId(String string) { 109 newsClassId = string; 110 } 111 112 /*** 113 * @see net.eastol.news.jdo.bean.News#getClassId() 114 */ 115 public String getClassId() { 116 return newsClassId; 117 } 118 119 /*** 120 * @param date 121 */ 122 public void setDate(Date date) { 123 this.date = date; 124 } 125 126 /*** 127 * @return TODO 128 */ 129 public Date getDate() { 130 return date; 131 } 132 133 /*** 134 * @param i 135 */ 136 public void setHits(int i) { 137 hits = i; 138 } 139 140 /*** 141 * @return TODO 142 */ 143 public int getHits() { 144 return hits; 145 } 146 147 /*** 148 * @see net.eastol.news.jdo.bean.News#setObjectId(java.lang.String) 149 */ 150 public void setObjectId(String objectId) { 151 this.objectId = objectId; 152 } 153 154 /*** 155 * @see net.eastol.news.jdo.bean.JDOConst#getObjectId() 156 */ 157 public String getObjectId() throws UtilException { 158 if (this.objectId != null) { 159 return this.objectId; 160 } 161 162 Object oid = JDOHelper.getObjectId(this); 163 char[] m = null; 164 165 m = Base64Utils.encode(oid); 166 167 String oidStr = new String(m); 168 169 return oidStr; 170 } 171 172 /*** 173 * @param string 174 */ 175 public void setSummary(String string) { 176 summary = string; 177 } 178 179 /*** 180 * @return TODO 181 */ 182 public String getSummary() { 183 return summary; 184 } 185 186 /*** 187 * @see net.eastol.news.jdo.bean.News#setTitle(java.lang.String) 188 */ 189 public void setTitle(String string) { 190 title = string; 191 } 192 193 /*** 194 * @see net.eastol.news.jdo.bean.News#getTitle() 195 */ 196 public String getTitle() { 197 198 return title; 199 } 200 201 /*** 202 * @see net.eastol.news.jdo.bean.News#setTitleImg(java.lang.String) 203 */ 204 public void setTitleImg(String string) { 205 titleImg = string; 206 } 207 208 /*** 209 * @see net.eastol.news.jdo.bean.News#getTitleImg() 210 */ 211 public String getTitleImg() { 212 213 return titleImg; 214 } 215 216 /*** 217 * @see net.eastol.news.jdo.bean.JDOConst#delete() 218 */ 219 public void delete() { 220 JDOHelper.getPersistenceManager(this).deletePersistent(this); 221 } 222 } 223 224 225 /* 226 * $Log: NewsBeanBase.java,v $ 227 * Revision 1.1 2003/09/10 09:28:36 bitiboy 228 * *** empty log message *** 229 * 230 * 231 */

This page was automatically generated by Maven